/**
 * Created by wangwei on 17/7/14.
 */

/**
 * Created by wangwei on 17/7/13.
 */
var path = require('path');
var webpack = require('webpack');
//var CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
    entry: {
        'app': './src/cmis-directive.coffee',
        'vendor': ['angular', 'angular-local-storage']
    }
    ,
    output: {
        filename: '[name].bundle.js',
        path: path.resolve(__dirname, 'dist')
    },

    devtool: 'inline-source-map',
    module: {
        //preLoaders: [
        //    {   test: /\.json$/,
        //        loader: 'json'
        //    }
        //],

        rules: [
            {
                test: /\.coffee$/,
                use: [ 'coffee-loader' ]
            },
            {
                test: /\.js$/,
                loaders: ['babel', 'eslint-loader'],
                exclude: /node_modules/
            }
            //{
            //    test: /\.json$/,
            //    loader: "json"
            //},
            //{
            //    test: /\.js$/,
            //    exclude: /(node_modules|bower_components)/,
            //    use: {
            //        loader: 'babel-loader',
            //        options: {
            //            presets: ['env']
            //        }
            //    }
            //}
        ]
    }
};
